public class format {
    public static void main(String[] args) {
        String formatted = String.format("Hello, %s! You have %d new messages.", "Alice", 5);
        System.out.println(formatted); // 输出: Hello, Alice! You have 5 new messages.
    }
}
